import {createStore} from "redux";

let reducer =(state,action)=>{
    if(action.type==="add"){
        console.log(action)
        action.num++;
    }else if(action.type=="dis"){
        action.num--;
    }
    state.num=action.num;
    return {...state}
}
let initState={
    num:0
}
const store=createStore(reducer,initState);
window.store=store;

